1. Field of the Invention
The present invention relates to intercept software, and more particularly to a system and method for intercepting file system writes.
2. Description of the Related Art
In database systems, such as the Oracle database, available from Oracle Corporation, typically one or more log files exist for purposes of recording transactions for future use (e.g., recovery). Database transactions are written by the database programs to these log files sequentially, typically with over-write capabilities, such that the most recent set of database transactions are always available within the set of log files. The database administrator must select xe2x80x9carchivexe2x80x9d logging in order to archive each log file, as it fills up, to auxiliary storage (e.g., a tape); otherwise, when the last log file is reached, and filled up, the first log file is over-written with the next database transaction. Consider an example: a database with six log files (i.e., log file 1, log file 2, log file 3, log file 4, log file 5, and log file 6). When log file 1 fills up, database transactions are written to log file 2; when log file 2 fills up, database transactions are written to log file 3, and so on. Eventually, when log file 6 fills up, database transactions are written to log file 1, thus over-writing the oldest logged database transactions. If the first set of database transactions written to log file 1 are not archived (i.e., written to auxiliary storage), those database transactions are lost and cannot be recovered, should a recovery be determined to be required.
Current database reorganization solutions, particularly online reorganization solutions, typically require processing to determine where the log writer pointer resides within the series of log files. Such processing slows down the online reorganization. It is desirable to eliminate the step of searching for the position of the log writer pointer within the series of log files, thus allowing the online reorganization to complete in less time, and to require fewer system resources than current implementations.
For the foregoing reasons, there is a need for a system and method for intercepting file system writes such that the location of the log writer pointer may be maintained, and online reorganizations may be completed in less time.
The present invention provides various embodiments of a method and system for intercepting file system writes.
In one embodiment, a software utility (e.g., a first software utility) may register one or more files with an intercept software component technology. Prior to registering the one or more files, initialization processing may occur. Initialization may include clearing or re-setting various values and/or parameters. In the case where the file system writes to be intercepted are writes to a database, initialization may include synchronizing or quiescing the database. The intercept software component technology may be started prior to the one or more files being registered.
After the registering step has been performed, the software utility may issue a start command to the intercept software component technology. The start command may provide the signal to the intercept software component technology to start intercepting file writes for all registered files.
After the start command has been issued, the intercept software component technology may intercept writes to the one or more registered files. When a write request is issued while intercept processing is enabled, the write request may cause the intercepted write data to be placed in a cache (e.g., a memory cache or a disk cache).
The intercepted writes may be allowed to complete normal processing after the intercepted writes are stored in the cache. The intercepted writes may then be retrieved (e.g., by a first software utility, or by a user-specified request) from the cache (e.g., in first-in-first-out (FIFO) order, or in some other user-specified order).
In one embodiment, the process of intercepting writes may include: finding one or more file identifiers (e.g., vnodes) associated with the one or more files; storing a copy of original information related to each file identifier (e.g., vnode operation pointers, write pointers); modifying a write pointer within the original information related to each file identifier; using the modified write pointer to store the intercepted write in a cache (e.g., a memory cache or a disk cache).
In one embodiment, the intercept software component technology may be stopped or terminated, after retrieving the intercepted writes. Termination processing may occur after the intercept software component technology is stopped.
In one embodiment, the intercept software component technology may execute on a first computer system, and the first software utility may execute on a second computer system. The first computer system and the second computer system may communicate over a network (e.g., the Internet).